package com.brillilab.dao.mapper.message;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.brillilab.domain.po.message.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 消息表 Mapper 接口
 * </p>
 *
 * @author WuMenghao
 * @since 2019-05-17
 */
public interface MessageMapper extends BaseMapper<Message> {

	int allRead( @Param("userId")Long userId);

	List<Message> getTopUnReadMsgList(@Param("top")Integer top, @Param("userId")Long userId, @Param("msgTypeList")List<Integer> msgTypeList);

	int getUnReadMsgCount(@Param("userId")Long userId);

    int insertBatch(List<Message> messages);
}
